package cn.lanqiao.bigDate.mapper.data;

import cn.lanqiao.bigDate.entity.data.DataBookOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DataTendencyMapper extends BaseMapper<DataBookOrder> {
    @Select("select sum(form.quantity) quantity,form.time from (select left(book.date,10)as time,book.* from data_book_order book ORDER BY left(book.date, 10)) form group by form.time order by form.time")
    List<DataBookOrder> findTendency();
}
